From 11623a8d90ad36cad1c68aa22433bdf70905588e Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Thu, 24 May 2007 13:25:05 +0100 Subject: [PATCH] Unmap vcpu_info mapping in arch_domain_destroy. We don't need to touch it in arch_vcpu_reset() because that's only used to recover from a failed suspend, and the correct behaviour there is to leave the mapping as-is. --- xen/arch/x86/domain.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index e413b0249c..bf6ad0c5e3 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -489,6 +489,9 @@ void arch_domain_destroy(struct domain *d) { struct vcpu *v; + for_each_vcpu( d, v ) + unmap_vcpu_info(v); + if ( is_hvm_domain(d) ) { for_each_vcpu ( d, v ) @@ -731,7 +734,6 @@ int arch_set_info_guest( int arch_vcpu_reset(struct vcpu *v) { - unmap_vcpu_info(v); destroy_gdt(v); vcpu_destroy_pagetables(v); return 0; @@ -739,8 +741,8 @@ int arch_vcpu_reset(struct vcpu *v) /* * Unmap the vcpu info page if the guest decided to place it somewhere - * else. This is only used from arch_vcpu_reset, so there's no need - * to do anything clever. + * else. This is only used from arch_domain_destroy, so there's no + * need to do anything clever. */ static void unmap_vcpu_info(struct vcpu *v) -- 2.30.2